from datetime import datetime

from src.database.core import Base

from sqlalchemy.orm import Mapped, mapped_column


class Weather(Base):
    __tablename__ = "weather"

    id: Mapped[int] = mapped_column(primary_key=True)
    regionId: Mapped[int] = mapped_column()
    temperature: Mapped[float] = mapped_column()
    humidity: Mapped[float] = mapped_column()
    windSpeed: Mapped[float] = mapped_column()
    weatherCondition: Mapped[str] = mapped_column()
    precipitationAmount: Mapped[float] = mapped_column()
    measurementDateTime: Mapped[datetime] = mapped_column()


class Weather_condition(Base):
    __tablename__ = "weather_condition"

    id: Mapped[int] = mapped_column(primary_key=True)
    condition: Mapped[str] = mapped_column()


class Forecast(Base):
    __tablename__ = "forecast"

    id: Mapped[int] = mapped_column(primary_key=True)
    dateTime: Mapped[datetime] = mapped_column()
    temperature: Mapped[float] = mapped_column()
    weatherCondition: Mapped[str] = mapped_column()
    regionId: Mapped[int] = mapped_column()


class Weather_to_forecast(Base):
    __tablename__ = "weather_to_forecast"

    id: Mapped[int] = mapped_column(primary_key=True)
    weatherId: Mapped[int] = mapped_column()
    weatherForecast: Mapped[int] = mapped_column()


# class Card(Base):
#     __tablename__ = "card"

#     id: Mapped[uuid.UUID] = mapped_column(
#       primary_key=True,
#       default=uuid.uuid4
#     )
#     pet_name: Mapped[str] = mapped_column()
#     pet_type_id: Mapped[int] = mapped_column(ForeignKey("pet_type.id"))
#     date_birth: Mapped[date] = mapped_column(DateTime(timezone=True))
#     main_image: Mapped[str] = mapped_column(nullable=True)
#     castrated: Mapped[bool] = mapped_column(default=False)
#     vaccinated: Mapped[bool] = mapped_column(default=False)
#     cat_litter_box: Mapped[bool] = mapped_column(default=False)
#     description: Mapped[str] = mapped_column(nullable=True)
#     counter_views: Mapped[int] = mapped_column(default=0)
#     donated_amount: Mapped[int] = mapped_column(default=0)

#     pet_type: Mapped["Pet_type"] = relationship()
#     articles: Mapped[List["Article"]] = relationship()


# class Article(Base):
#     __tablename__ = "article"

#     id: Mapped[uuid.UUID] = mapped_column(primary_key=True)
#     title: Mapped[str] = mapped_column(nullable=False)
#     body: Mapped[str] = mapped_column()
#     date_publish: Mapped[date] = mapped_column(
#         DateTime(timezone=True), nullable=False)
#     card_id: Mapped[uuid.UUID] = mapped_column(ForeignKey("card.id"))

#     # images: Mapped[List["Image"]] = relationship()
